<include file="public:header" />


<div class="main-container container">
    <!-- <div class="row">
        <div class="tools-bar">
            <div class="countdown pull-left">
                <strong>赛事倒计时<span>COUNTDOWN</span></strong>
                <div class="bd time">
                    
                </div>
            </div>
            <div class="pull-left rlink">
                <a href="#"><i class="icon-user"></i>注册</a>丨<a href="#">登录</a>
            </div>
        </div>
    </div> -->
     <div class="row">
        <ol class="breadcrumb">
          <li><a href="#">首页</a></li>
          <li class="active">报名赛事</li>
        </ol>
        <div class="member-mc">
                <h3 class="title-m v2"><span>2017台州国际马拉松赛报名查询</span></h3>
                <div class="content-block v2 col-main">
                    <div class="form-horizontal form-mc">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">手机：</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" name="mobile" id="mobile" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">证件类型：</label>
                            <div class="col-sm-6">
                                <select class="form-control" name="id_type" id="id_type">
                             <option value="1">身份证 ID CARD</option>
	                        <option value="2">军官证 Certificate Card</option>
	                        <option value="3">护照 Passport</option>
	                        <option value="4">台胞证 MTP</option>
                       	     <option value="5">回乡证 Home Re-entry Permit</option>
                        </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">证件号：</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control"  name="id_number" id="id_number">
                            </div>
                        </div>
                        <!--
		                <div class="form-group">
		                    <label class="col-sm-4 control-label">验证码 Identifying code：</label>
		                    <div class="col-sm-3 form-inline inline">
		                        <input type="text" class="form-control" size="8"  id="validate" name="validate"  onfocus="this.select();">
		                    	<img src="<?php echo __ROOT__;?>/validateimg.php" class="id-code-img" onclick="javascript:reloadVerificationCode();"  id="verifyImage">
		                    </div>
		                </div>
		                -->
                        <div class="form-group btn-list">
                            <div class="col-sm-6 col-sm-offset-3">
                                <button type="button" class="btn btn-lg btn-danger" onclick="javascript:do_submit();">立即查询</button>
                            </div>
                        </div>
                       
                    </div>
                </div>

            </div>
    </div>
</div>



<script  type="text/javascript">

    function reloadVerificationCode(){
        document.getElementById('verifyImage').src = '<?php echo __ROOT__;?>/validateimg.php?'+Math.random();
        document.getElementById('validate').value = '';
    }
    
	function show_error(v){
		alert(v);
		//$.com.alert.open(v);
	}
	
	function do_submit(){
		
		var id_type=$("#id_type").val();
		var id_number=$("#id_number").val();
		var mobile=$("#mobile").val();
		
		//var validate=$("#validate").val();
	        
	        
	        if (id_type==""){
	            show_error("请输入证件类型 Please input ID Type");
	            return false;
	        }
	        else{
	        }
	        
	        
	        if (id_number==""){
	            show_error("请输入证件号码 Please input ID Number");
	            return false;
	        }
	        else{
	        }
	        
	        
	        
	        if (mobile==""){
	            show_error("请输入手机 Please input Mobile");
	            return false;
	        }
	        else{
	        }
	        
	        
	        //if (validate==""){
	        // 	show_error("请输入正确的验证码 Please input Identifying code");
		     //  return false;
	       // }
	       //  else{
		   //}
	        
	        
	        
              
        $.ajax({
            url: "<?php echo __ROOT__;?>/baoming/order_search_sub",
            async: false,
            type: "POST",
            dataType: "json",
            data: {
            id_type:id_type,
            id_number:id_number,
            //validate:validate,
            mobile:mobile
            
            },
            success: function(ret){
                if(ret.success=='success'){
                	
                	//alert(ret.order_id);return false;
                    location.href="<?php echo __ROOT__;?>/baoming/order_search_finish/order_id/"+ret.order_id;
                	//alert(123);return;
                	//location.href="<?php echo __ROOT__;?>/baoming/apply_finish/order_id/"+ret.order_id;
                	
                	//alert(ret.order_id);
                	
                	//location.href="<?php echo __ROOT__;?>/baoming/index";
                	
					//$('.valid_error').html("注册成功。3秒后跳转到首页...");
					//setTimeout('location.href="<?php echo __ROOT__;?>/baoming/index";', 3000);
					
                }
                //else if(ret.success=='mobile_is_cunzai'){
                //	$('.valid_error').html("相同手机号已存在。");
                //    return false;
                //}
                else{
                	
                	 show_error(ret.success);
	              return false;
	              
                }
            }
        });
        
        
	}
</script>





<include file="public:footer" />
